package com.java.asvitelskyy.company;

public class FixWorker extends Worker {

    private int salary;

    public FixWorker(String name, int id, int salary) {
        super(name, id);
        this.setSalary(salary);
    }

    public String getWorker() {
        return String.format("%8s | %8s | %8s |", getId(), getName(), getSalary());
    }

    @Override
    public int calcSalary() {
        return getSalary();
    }

    public int getSalary() {
        return salary;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }
}
